package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.HUAWEI.EmsBarcodeAttribute;
import com.ruoyi.system.mapper.HUAWEI.EmsBarcodeAttributeMapper;
import com.ruoyi.system.service.IEmsBarcodeAttributeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author GE-LV5
 * @create 2023/4/10 16:53
 */
@Service
@Slf4j
public class EmsBarcodeAttributeServiceImpl extends ServiceImpl<EmsBarcodeAttributeMapper, EmsBarcodeAttribute> implements IEmsBarcodeAttributeService {
    @Override
    public AjaxResult queryAttributeReturn(EmsBarcodeAttribute emsBarcodeAttribute) {

        List<EmsBarcodeAttribute> emsBarcodeAttributes = baseMapper.selectList(new QueryWrapper<EmsBarcodeAttribute>()
                .eq("po", emsBarcodeAttribute.getPo())
                .eq("sn", emsBarcodeAttribute.getSn())
        );

        return AjaxResult.success(emsBarcodeAttributes);
    }
}
